﻿<%@ Page Language="C#" AutoEventWireup="true" ValidateRequest="false" %>

<%@ Register TagPrefix="bloget" Namespace="BlueOnionSoftware.Bloget" Assembly="Bloget" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
  <title>Example 3</title>
  <link rel="stylesheet" type="text/css" href="bos.css" />
  <style type="text/css">
  </style>
</head>
<body>
  <form id="form1" runat="server">
    <div id="wrap">
      <%--Header--%>
      <div id="header">
        <bloget:BlogetTitle runat="server" DataContext="~/App_Data/SampleBlog/Blog.xml">
          <TitleTemplate>
            <h1>
              <%#Container.BlogTitle%>
            </h1>
            <p>
              <%#Container.BlogDescription%>
              <br />
              <small>
                <%#Container.BlogCopyright%>
              </small></p>
          </TitleTemplate>
        </bloget:BlogetTitle>
      </div>
      <div id="nav">
        <ul>
          <li><a href="Default.aspx">Home</a></li>
          <li><a href="Example1.aspx">Example 1</a></li>
          <li><a href="Example2.aspx">Example 2</a></li>
          <li><a href="Example3.aspx">Example 3</a></li>
        </ul>
      </div>
      <%--Content--%>
      <div id="content">
        <bloget:BlogetBlog runat="server" ID="bloget2" DataContext="~/App_Data/SampleBlog/Blog.xml">
          <PostTemplate>
            <div class="posthead">
              <div class="postdate">
                <%#Container.PostCreated.ToString("dddd")%>
                <br />
                <span>
                  <%#Container.PostCreated.ToString("MMM d")%>
                </span>
                <br />
                <%#Container.PostCreated.ToString("yyyy")%>
              </div>
              <asp:HyperLink ID="TitleLink" runat="server" NavigateUrl="<%#Container.PostLink%>" Style="font-size: x-large"
                Text="<%#Container.PostTitle%>" />
              <br />
              <%# Container.PostTagLinks("&nbsp;&bull;&nbsp;").ToLower() %>
            </div>
            <div class="postcontent">
              <%#Container.PostContent%>
            </div>
            <p style="font-size: 95%; text-align: right">
              <asp:Image ID="Image2" runat="server" ImageUrl="~/Images/arrow.png" />
              <asp:HyperLink ID="HyperLink3" runat="server" NavigateUrl='<%# string.Format("http://www.feedburner.com/fb/a/emailFlare?itemTitle={0}&amp;uri={1}", Container.PostTitleUrlEncoded, Container.PostPermaLink) %>'>email this</asp:HyperLink>
              &bull;
              <asp:Image ID="Image1" runat="server" ImageUrl="~/Images/digg.png" />
              <asp:HyperLink ID="HyperLink4" runat="server" NavigateUrl='<%# string.Format("http://digg.com/submit?phase=2&amp;url={0}&amp;title={1}", Container.PostPermaLink, Container.PostTitleUrlEncoded) %>'>digg</asp:HyperLink>
              &bull;
              <asp:Image ID="Image3" runat="server" ImageUrl="~/Images/reddit.gif" />
              <asp:HyperLink ID="HyperLink5" runat="server" NavigateUrl='<%# string.Format("http://reddit.com/submit?url={0}&amp;title={1}", Container.PostPermaLink, Container.PostTitleUrlEncoded) %>'>reddit</asp:HyperLink>
              &bull;
              <asp:Image ID="Image4" runat="server" ImageUrl="~/Images/dzone.png" />
              <asp:HyperLink ID="HyperLink6" runat="server" NavigateUrl='<%# string.Format("http://www.dzone.com/links/add.html?url={0}&amp;title={1}", Container.PostPermaLink, Container.PostTitleUrlEncoded) %>'>dzone</asp:HyperLink>
              <br />
              <asp:HyperLink ID="HyperLink7" runat="server" NavigateUrl="<%#Container.PostEditLink%>" Text="edit" Visible="<%#Container.BlogLoggedIn%>" />
              <asp:Literal ID="Literal3" runat="server" Text=" &bull; " Visible="<%#Container.BlogLoggedIn%>" />
              <asp:HyperLink ID="HyperLink8" runat="server" NavigateUrl="<%#Container.PostLink%>" Text='<%#Container.PostCommentCount.ToString("comments (0)")%>' />
              &bull;
              <asp:HyperLink ID="HyperLink9" runat="server" NavigateUrl="<%#Container.PostLink%>" Text='<%#Container.PostPingbackCount.ToString("references (0)")%>' />
              <asp:Literal ID="Literal4" runat="server" Text="<br />" Visible="<%#Container.PostEnclosureLength != 0%>" />
              <asp:HyperLink ID="HyperLink10" runat="server" NavigateUrl="<%#Container.PostEnclosureLink%>" Text="<%#Container.PostEnclosureNameSize%>"
                Visible="<%#Container.PostEnclosureLength != 0%>" />
            </p>
            <p><i>Related:</i><br />
              <%#Container.RelatedPosts(3)%>
            </p>
          </PostTemplate>
          <%-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --%>
          <PostSeparatorTemplate>
            <div class="bar">
              &nbsp;</div>
          </PostSeparatorTemplate>
          <%-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --%>
          <CommentHeaderTemplate>
            <p style="font-size: x-large; font-weight: bold; letter-spacing: 1em">Comments</p>
          </CommentHeaderTemplate>
          <%-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --%>
          <CommentTemplate>
            <div style="background: aliceblue; padding-left: 10px; padding-right: 10px; margin-bottom: 1em; border: solid thin blue;">
              <p><b>
                <%#Container.CommentTitle%>
              </b></p>
              <div>
                <%#Container.CommentText%>
              </div>
              <p style="color: Gray;">
                <%#Container.CommentAuthor%>
                |
                <%#Container.CommentDate.ToString("r")%>
              </p>
            </div>
          </CommentTemplate>
          <%-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --%>
          <PingBackHeaderTemplate>
            <p style="font-size: x-large; font-weight: bold; letter-spacing: 1em">Pingbacks</p>
          </PingBackHeaderTemplate>
          <%-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --%>
          <PingBackTemplate>
            <p><b>
              <%#Container.PingBackDate.ToString("r")%>
            </b>
              <br />
              <a href="<%#Container.PingBackLink%>">
                <%#Container.PingBackLink %>
              </a></p>
          </PingBackTemplate>
          <%-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --%>
          <IndexTemplate>
            <%#Container.PostCreated.ToString("MM-dd-yyyy")%>
            &nbsp;&nbsp;
            <asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl="<%#Container.PostLink%>" Text="<%#Container.PostTitle%>" />
            <br />
          </IndexTemplate>
          <%-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --%>
          <IndexYearSeparatorTemplate>
            <p style="letter-spacing: 1em; color: Gray; font-size: large; text-align: center">
              <%#Container.PostCreated.ToString("yyyy")%>
          </IndexYearSeparatorTemplate>
          <%-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --%>
          <IndexMonthSeparatorTemplate>
            </p><p style="font-weight: bold; background: aliceblue">
              <%#Container.PostCreated.ToString("MMMM")%>
            </p>
            <p>
          </IndexMonthSeparatorTemplate>
          <%-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --%>
          <IndexFooterTemplate>
            </p></IndexFooterTemplate>
          <%-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --%>
          <RssContentTemplate>
            <%#Container.PostContent%>
            <a href="http://www.pheedo.com/click.phdo?x=629278952cea46f8ab773f4b239c5106&u=<%#Container.PostId%>">
              <img src="http://www.pheedo.com/img.phdo?x=629278952cea46f8ab773f4b239c5106&u=<%#Container.PostId%>"
                alt="advertisement" border="0" /></a>
          </RssContentTemplate>
          <%-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --%>
          <SearchResultsTemplate>
            <p>
              <h3>
                <asp:HyperLink runat="server" NavigateUrl="<%#Container.PostLink%>" Text="<%#Container.PostTitle%>" /></h3>
              <%#Container.PostExcerpt(250)%> ...
            </p>
          </SearchResultsTemplate>
        </bloget:BlogetBlog>
      </div>
      <%--Sidebar--%>
      <div id="sidebar">
      <p>
        <bloget:BlogetSearch ID="search" runat="server" DataContext="~/App_Data/SampleBlog/Blog.xml" />
      </p>
      <p>
        <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/example3.aspx?m=logon" Text="login (Hint:Bloget)" /><br />
        <a href="?m=rss" type="text/xml">RSS</a>
      </p>
        <h3>Categories</h3>
        <bloget:BlogetCategory runat="server" ID="blogetCategory" DataContext="~/App_Data/SampleBlog/Blog.xml" />
        <h3>Recent Posts</h3>
        <bloget:BlogetRecentPosts runat="server" ID="blogetRecent" DataContext="~/App_Data/SampleBlog/Blog.xml" />
        <h3>Archives</h3>
        <bloget:BlogetArchive runat="server" ID="archives" DataContext="~/App_Data/SampleBlog/Blog.xml" Length="10" />
        <h3>Blog Roll</h3>
        <bloget:BlogetBlogRoll runat="server" ID="blogroll" DataContext="~/App_Data/SampleBlog/Blog.xml" Uri="http://www.bloglines.com/export?id=blueonionsoftware">
          <BlogRollTemplate>
            <img src="Images/arrow.png" alt="" />
            <asp:HyperLink ID="HyperLink11" runat="server" NavigateUrl="<%#Container.BlogRollHtmlUrl%>" Text="<%#Container.BlogRollTitle%>" /><br />
          </BlogRollTemplate>
        </bloget:BlogetBlogRoll>
      </div>
      <div id="footer">
        <p>copyright &copy; 2007 Blue Onion Software<br />
          All rights reserved</p>
      </div>
    </div>
  </form>
</body>
</html>
